package org.come.mouslisten;

import org.come.Frame.GoodsMsgJframe;
import org.come.Frame.ZhuFrame;
import org.come.entity.Goodstable;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

public class QiandaoGoodsMouselistener implements MouseListener {

	private Goodstable goodstable;

	public QiandaoGoodsMouselistener(Goodstable goodstable) {
		this.goodstable = goodstable;
	}

	@Override
	public void mouseEntered(MouseEvent e) {
		if (goodstable == null) {
            return;
        }
		GoodsMsgJframe goodsMsgJframe = GoodsMsgJframe.getGoodsMsgJframe();
		ZhuFrame.getZhuJpanel().creatgoodtext(goodstable);
	}

	@Override
	public void mouseExited(MouseEvent e) {
		ZhuFrame.getZhuJpanel().cleargoodtext();
	}

	@Override
	public void mouseClicked(MouseEvent e) {
		// TODO Auto-generated method stub

	}

	@Override
	public void mousePressed(MouseEvent e) {
		// TODO Auto-generated method stub

	}

	@Override
	public void mouseReleased(MouseEvent e) {
		// TODO Auto-generated method stub

	}

	public Goodstable getGoodstable() {
		return goodstable;
	}

	public void setGoodstable(Goodstable goodstable) {
		this.goodstable = goodstable;
	}

}
